﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace TravelServer.Models
{
    public class TouristRoute
    {
        [Key]
        public Guid Id { get; set; }

        [Required]
        public string? Title { get; set; }
      
        public string? Url { get; set; }

        [Required]
        public string? Description { get; set; }
        [Column(TypeName = "decimal(18,2)")]
        public decimal OriginalPrice { get; set; }
        public double? DiscountPresent { get; set; }

        public DateTime CreateTime { get; set; }
        public DateTime? UpdateTime { get; set; }
        public DateTime? DepartureTime { get; set; }

        public string? Features { get; set; }

        public string? Fees { get; set; }
        public string? Notes { get; set; }

        // 1对多关系的集合导航属性
        public ICollection<TouristRoutePictures>? TouristRoutePictures { get; set; } = new List<TouristRoutePictures>();

        public double? Rating { get; set; }
        public TravelDays? TravelDays { get; set; }
        public TripType? TripType { get; set; }
        public DepartureCity? DepartureCity { get; set; }
    }
}
